In [ ]:
import getpass
from github3 import login
In [ ]:
from github3 import authorize
from getpass import getuser, getpass
user = 'willingc'
password = ''
while not password:
password = getpass('Password for {0}: '.format(user))
note = 'github3.py example app'
note_url = 'http://example.com'
scopes = ['user', 'repo']
auth = authorize(user, password, scopes, note, note_url)
with open(CREDENTIALS_FILE, 'w') as fd:
fd.write(auth.token + '\n')
fd.write(auth.id)
In [ ]:
user = 'willingc'
In [ ]:
password = getpass.getpass()
In [ ]:
gh = login(user, password)
In [ ]:
print(gh)
type(gh)
In [ ]:
jupyter_seeker = gh
In [ ]:
print(jupyter_seeker.user('willingc'))
In [ ]:
sphinx = gh.organization('sphinx-doc')
In [ ]:
for repo in sphinx.iter_repos():
print(repo, repo.open_issues_count, repo.description)
repo.to_json
In [ ]:
sub_jup_ui = ['jupyter/notebook', 'jupyter/jupyter_console', 'jupyter/qtconsole']
sub_kernels = ['ipython/ipython', 'ipython/ipythonwidgets', 'ipython/ipyparallel']
sub_formatting = ['jupyter/nbconvert', 'jupyter/nbformat']
sub_education = ['jupyter/nbgrader']
sub_deployment= ['jupyter/jupyterhub', 'jupyter/jupyter-drive', 'jupyter/nbviewer','jupyter/tmpnb', 'jupyter/tmpnb-deploy','jupyter/dockerspawner','jupyter/docker-stacks']
sub_architecture = ['jupyter/jupyter_client', 'jupyter/jupyter_core']
In [ ]:
for subproject in sub_jup_ui:
print(subproject)
In [ ]:
for issue in gh.iter_repo_issues('jupyter','notebook'):
if issue.state == 'open':
print(issue.number, issue.title)
myissues = gh.iter_repo_issues('jupyter','notebook')
In [ ]:
for issue in gh.iter_repo_issues(owner='jupyter', repository='jupyter'):
print(issue.number, issue.title)
print(issue.labels)
print(issue.created_at)
print(issue.updated_at)
In [ ]:
In [ ]:
def list_issues(token, owner='jupyter', repo=repo):
for issue in token.iter_repo_issues(owner=owner, repository=repo):
if issue.state == 'open':
print(issue.number, issue.title)
In [ ]: